package com.quanxi.qxaimain.common.globalException;

import com.google.gson.JsonObject;
import lombok.Data;

/**
 * @Author lyx
 * @create 2022/9/1 16:31
 * 返回统一封装类
 */
@Data
public class ResponseVo {

    //  状态码
    private int code;

    // 状态信息
    private Object msg;

    // 返回对象
    private Object data;


    // 默认返回成功状态码，数据对象
    public ResponseVo(Object data) {
        this.code =ResultCode.SUCCESS.getCode();
        this.msg =ResultCode.SUCCESS.getMsg();
        this.data = data;
    }


    // 返回指定状态码，数据对象
    public ResponseVo(int code,Object msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }



}